package com.cy.entity;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang.StringUtils;
import org.hibernate.annotations.Type;


/**
 * <p>Description: [后台用户]</p>
 * @author         [曹悦] 
 */
@Entity
@Table(name = "CY_BACK_BACKUSER")
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
public class BackUser implements Serializable{

	private static final long serialVersionUID = 5559914512284185114L;
	
	private Long id;
    
	private String loginName;									//帐号
    private String password;									//密码
    private String nickname;								    //用户昵称
    private String backuserNo;								    //用户编号
    private NormalStatus status=NormalStatus.NORMAL;			//后台用户状态 ，默认是正常
    
    private Date createTime;									//创建时间
    private Date updateTime;									//更新时间
    private String lastModifiedBy;								//最近的更新人
    
    
    @Id
	@SequenceGenerator(name = "CY_BACK_BACKUER_SEQ", sequenceName = "CY_BACK_BACKUER_SEQ",allocationSize=1,initialValue=1)
	@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "CY_BACK_BACKUER_SEQ")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(length=50,name="loginName")
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	
	@Column(length=50,name="password")
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	@Column(length=50,name="nickname")
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	
	@Type(type="com.cy.entity.NormalStatusUserType")
	public NormalStatus getStatus() {
		return status;
	}
	public void setStatus(NormalStatus status) {
		this.status = status;
	}
	
	@Column(name="lastModifiedBy")
	public String getLastModifiedBy() {
		return lastModifiedBy;
	}
	public void setLastModifiedBy(String lastModifiedBy) {
		this.lastModifiedBy = lastModifiedBy;
	}
	
	@Column(name="createTime")
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Column(name="updateTime")
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	@Column(name="backUserNo")
	public String getBackuserNo() {
		return backuserNo;
	}
	public void setBackuserNo(String backuserNo) {
		this.backuserNo = backuserNo;
	}
	
    
    
    
}
